<html>
	<head>
		<title>延时器及定时器</title>
		<meta http-equiv="Content-Type content=html/text" charset="utf-8">
		<script>
			window.onload = init;
			function init () {
				
				window.document.body.bgColor="red";
				var url1 = "";
				var name = "win";
				var optional = "width=500, height=400, left=300 top=200, toolbar=yes";

				var winObj = window.open(url1, name, optional);
				winObj.setTimeout(close, 2000);
			}
			
		</script>
	</head>
	<body>
		<a href="shopping.html" target="win">测试链接</a>
	</body>
</html>